package com.springs.service;

public class UserServiceProxy implements UserService {
    private UserService service;

    public void setService(UserService service) {
        this.service = service;
    }

    @Override
    public void add() {
        log("add");
        service.add();
    }

    @Override
    public void delete() {
        log("delete");
        service.delete();
    }

    @Override
    public void update() {
        log("update");
        service.update();
    }

    @Override
    public void query() {
        log("query");
        service.query();
    }

    private void log(String message) {
        System.out.println("[DEBUG]使用了"+message+"方法");
    }
}
